package com.plian.system.entity.pf;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author: Take-off
 * @Description: TODO
 * @Date: 2023/1/16 9:42 AM
 * @Version: 1.0
 **/
@Data
@TableName("pf_base_evaluation_score")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "BaseEvaluationScore 对象", description = "履职成效考评-企业评分主表")
public class BaseEvaluationScore extends BaseEntity {
    @ApiModelProperty(value = "单据编码")
    private String code;

    @ApiModelProperty(value = "年度")
    private String fillingYear;

    @ApiModelProperty(value = "评分主体")
    private String fillingUnitId;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @ApiModelProperty(value = "评分时间 - yyyy-MM-dd")
    private Date scoreTime;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "审批时间")
    private Date approvedTime;

    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    @ApiModelProperty(value = "单据类型")
    private String formType;

    @TableField(exist = false)
    @ApiModelProperty(value = "评分细则")
    private List<EvaluationScoreDetail> evaluationScoreDetails;

    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;

    @ApiModelProperty(value = "数据来源id", required = true)
    private String dataSourceId;

}
